//
// Created by dddgzc on 2025/2/6.
//

#ifndef STATUSBAR_H
#define STATUSBAR_H
#include <SDL.h>
#include <Camera.h>

class StatusBar {
public:
    StatusBar() = default;
    ~StatusBar() = default;

    void setAvatar(SDL_Texture* avatar);
    void setPosition(int x, int y);
    void setHp(int hp);
    void setMp(int mp);
    void onDraw(const Camera &camera);
private:
    int hp = 0;
    int mp = 0;
    SDL_Point point = {0}; // 绘制位置
    SDL_Texture* avatar = nullptr;
    const int width = 275; // 定义状态条的宽度
};

#endif //STATUSBAR_H
